﻿FROM docker.dev.crenjoy.com/library/tomcat:11.0-jdk21-temurin

ARG GOARCH
ARG MVN_VERSION

EXPOSE 50051 8090 8080
WORKDIR /usr/app

## Grpc 服务
ADD jmash-websocket-service/target/jmash-websocket-service-${MVN_VERSION}.war /usr/local/tomcat/webapps/ROOT.war

## Grpc网关
ADD jmash-websocket-gateway/bin/main_${GOARCH}  gateway
ADD jmash-websocket-gateway/openapi   openapi
ADD jmash-websocket-k8s/start_script.sh start_script.sh

RUN chmod +x gateway
RUN chmod +x start_script.sh

ENTRYPOINT ["./start_script.sh"]
